Artillery
Advanced Artillery Request System by Bonthumb|300px|right|ArmA2 AARS Precision Fire this script lets you call in Artillery Fire Missions. Instead of letting you set coordinates for splashdown by simply clicking on the map, its goal is to be a bit more realistic. It features *Registering for fire missions *Designating targets using polar coordinates *Accurate Fire Missions require Adjustment Fire *Designating via Lasermarker *Different options for Artillery Setup, like types of rounds, spread radius *Delaying Fire *Full customization support *Fancy artillery sounds captured from the GL4SFX Mod *Respawn compatibility *PvP support, means, playerside dependent Editor setup Very important when making new mission : Start ArmA2, open the editor and load your mission into it. : (1) Press F1, double-click somewhere on the map. : (2) Choose Game Logic as Side, : (3) Objects as Class, : (4) and write Server into the Name-ﬁeld. Then click OK. Customization There are many things you can customize in this component. For customization, open the ﬁle bon_arti_init.sqf located in the bon_artillery folder. Call Sign HW_Arti_CallSign can be any string that then will appear in the radio chatter when using the artillery. (And yes, I am a big fan of Generation Kill…) Number Cannons HW_Arti_CannonNumber must be an integer ≥1 and sets the number of cannons to appear in the list of cannons when opening the artillery menu. A high number of cannons is more effective than a high number of shells that can be ﬁred for each cannon on a single request - Firing two shells from the same cannon implies a short reload time between the splashdown, where two cannons can ﬁre in parallel. Number Rounds / h HW_arti_number_shells_per_hour must be an integer ≥1 and sets how many shells can be ordered to ﬁre every hour. For each shell being ﬁred this value decreases by 1, and resets after a full hour has past during the game. Players get notiﬁed of reset by a sidechat message. Artillery Types HW_arti_types is an array / a list consisting of elements in the form Type”. - “Displayname” is a string that appears in the combobox of the menu when using it. - “Round Type” is the string referring to the classname of the type that gets created over the designated zone. The classnames are deﬁned in ArmA2ʼs CfgVehicle conﬁgﬁle. Max. Number Shells HW_arti_maxnrshells must be an integer ≥1 and sets how many rounds can be ﬁred by each cannon in a single ﬁre mission request. Artillery Spread Types HW_arti_spreads is an array / a list consisting of elements in the form “Displayname”,. - “Displayname” is a string that appears in the combobox of the menu when using it. - is an integer that sets the radius in meters shells will go down with the designated zone as center. Note: the feature to designate a target with a laser designator, the dispersion must be an integer < 0. Displaying Position HW_arti_show_pos_on_map set to true enables every player to read out his/her polar coordinates when opening the ingame map. This allows players who arenʼt even Artillery Observers to transmit their position to those who are. Set to false disables this feature. Availability Restrictions Of course most of the time you want this feature to be restricted to certain players. This script offers you to easily restrict it to: 1. the playerʼs class: Extend the list _arti_cond_classes by the classes which should be able to use this system, or leave it empty for no such restriction. 2. the playerʼs side: Extend the list _arti_cond_sides by the sides which should be able to use this system, or leave it empty for no such restriction. Possible sides are: WEST,EAST,CIVILIAN,GUER. 3. weapons the player must be equipped with: extend the list _arti_cond_weapons by the weapons classnames deﬁned in ArmA2ʼs CfgWeapons conﬁgﬁle. 4. own restrictions: Replace the true in the string _arti_cond_other by any statement that either returns FALSE or TRUE when calling it. Usage The Overall Interface Ok. lets take a look at what all these elements mean: (1) resources: shows how many shells can be ordered to ﬁre in the remaining hour for the particular side (2) your own position in cartesian coordinates: the position on the map/the three-dimensional space can be determined by three coordinates, namely x-ray for the point on the x-axis (west to east), yankee for the point on the y-axis (south to north) zulu for the height, where the latter one is of special interest for us, as we will discuss in the next section. (3) Input ﬁelds: Here you have to insert the values of the positional vector in form we discussed one point above. Note: The values to enter are not necessarily the ones representing your own position. It might be possible another player transmits his/her coordinates and direction/distance information to you so you can call artillery on a target another player has designated. Apart from your positional data you have to enter the direction in degrees to the target and the distance between the given position and the target. When you apply your coordinates you will also get approximate direction --- you DON'T have to look the compass ***. For obtaining distance in ArmA2 Vanilla simply press SPACEBAR. Using ACE2 you might need to be equipped with a speciﬁc range-ﬁnding device. :(***) bon_artillery\dialog\apply_pos.sqf //by Bon_Inf* #include "definitions.sqf" disableSerialization; ctrlSetText format["%1",round (getPos player select 0)]; ctrlSetText format["%1",round (getPos player select 1)]; _angle = 0; _dir = 0; _diff = 361; while {_angle < 360} do { if (((abs((getDir player) - _angle)) < 5) and ((abs((getDir player) - _angle)) < _diff)) then {_dir = _angle; _diff = (abs((getDir player) - _angle));}; _angle = _angle + 5; }; ctrlSetText format["%1",_dir]; if(true) exitWith{}; Last but not least you need to set the height difference between the spotter and the target using the slider on the right-hand side of the dialog. Why do we need to do that? Simply said, the polar coordinates, consisting of a two-dimensional position, an angle and a distance value are only deﬁned in two-dimensional space. That causes one problem since we are working in a three-dimensional vector space. (4) Cannon list: The list of cannons that can be ordered to ﬁre. Each cannon needs reload time after a ﬁre mission, thus is not available due to this time. The duration of this reload time depends on the number shells that were ﬁred in the previous ﬁre mission. A cannon unavailable appears colored red in this list. You can select a single cannon by pressing the left mouse button on it, or you can select any set of cannons by pressing and holding LEFT CTRL while clicking the left mouse button, as it is done in the picture on the right. Or also can select a set of consecutive entries using the LEFT SHIFT button in combination with the left mouse button. (5) Cannon Settings: Several options might be applied to a particular cannon, whose are: • the type of ﬁre mission, • the number shells the particular cannon has to ﬁre for this mission, • the dispersion or spread of the shots, • and either it should be ﬁre for effect or for adjustment. Both these mission types are explained in the following sections. (6) Cannon Summary: Once you applied settings to cannon(s), your settings are summarized in this window, when marked in the cannon list. Thus you can check the settings for every cannon afterwards. (7) Correction for precise ﬁre missions: Precise ﬁre missions require adjustment. In case you order adjustment ﬁre and actually have to correct the splashdown position, this area of menu is used. Call in a (spread) ﬁre mission Open the artillery dialog from your action menu. You now either gets registered for ﬁre mission. Then you will stay registered unless you press the Cancel button or Execute button. No one else will be able to call in artillery while you are registered. This enables you to close the dialog by pressing ESC without loosing any data entered so far, change your position or direction you are looking at. This way you can designate more than one area or target with one single ﬁre mission. Now let us deﬁne a checklist to call in artillery. Should be easy to remember the procedure when having a routine to follow. Procedure Apply your / the spotters position by writing them into the editable ﬁelds labeled with x-ray and yankee. In case its your own position, you can simply click somewhere on the area in the menu labeled with Your current position and the positional values below. Apply distance to target by writing it into the editable ﬁelds labeled with distance. With all these information we have the polar coordinates of the designated position, which then, again, are converted into cartesian coordinates by the system. Set height dispersion to your target. Select the cannons to ﬁre, by highlighting them in the cannon list (4). Select Type of Mission, regarding to the type of target that has to be suppressed. Select Number Shells each cannon should ﬁre. As already mentioned, consider that one cannon ﬁring two shots need about 15 seconds, two cannons ﬁring single shot each can ﬁre in parallel. The drawback in the second option is that you occupy two cannons for one target. Select the Splashdown Dispersion, namely spread. This can be completely customized, the default values are: • TIGHT, with a spread radius of 25m, • SCATTERED, with a spread radius of 50m, • WIDE, with a spread radius of 100m. Set a ﬁre delay for the selected cannons. Apart from the time the mission data is transmitted and the shell travel time (which all in all might be something about 15 seconds) this value in seconds will be added. Apply your settings to the selected cannons by clicking on the conﬁrm button. The cannon summary window (6) will be updated to show the setup of the currently selected cannon. You can browse through the cannons in the cannon list, the summary window will always update corresponding to the selection. On the same way you can clear cannons from any setup clicking on the Reset button. Once you have conﬁrmed all settings, press Execute to call the artillery in. Call in a precise ﬁre mission using adjustment ﬁre Besides the spread types TIGHT, SCATTERED and WIDE there is also the type PRECISE. Of course it is unlikely artillery ﬁres with an accuracy better than 25 meters (in reality, even 25m of accuracy is hardly achievable), BUT, we have the option to adjust ﬁre, means, ﬁring a single shot, i.e., a red smoke shell, to see where the shells would go down and correct this position relative to our / the spotterʼs position. That works as simple as follows: Enter Positional Data as we did it in the previous section. Now instead of selecting cannons select ADJUSTMENT FIRE from the mission type text box. Press Execute and await red smoke. The red smoke indicates where the shells would go down when ﬁring for effect. If this position is okay, proceed the same way as in the previous section, except, that you select PRECISE spread type. Otherwise use the arrow buttons located in the bottom right corner of the dialog to adjust the splashdown position relative to where the spotter stands. The spotter might adjust the position 10 meters to the right, and perhaps 5 meters more far away. That would be clicking the “right-arrow” 10 times and the “forward-arrow” 5 times. Once the position is settled, conﬁrm the settings to the cannons as explained in the previous section, and press Execute. Call in precise ﬁre mission using a laser designator Using the laser designator to mark the target is the most simple and most reliable way of calling artillery on a target, and there is not much to explain, since no more positional data is required. Select the cannons to ﬁre, by highlighting them in the cannon list (4). Select Type of Mission, regarding to the type of target that has to be suppressed. Select Number Shells each cannon should ﬁre. Select LASER as spread. Conﬁrm the settings, press Execute. Lase the target. It is also possible for another player to lase the target, such that the system uses his/her lasertarget to drop artillery on. Important here: - The player using this system must have visual to the lasered target. - The player using this system must also look into the lasered targets direction, more speciﬁcally, the operatorʼs line of sight has to intersect the imaginary circle around the lasertarget and a radius of 100m. Category:Snippets